<div class="accordion">
<@sys.moduleList parentId=parentId>
    <#list page.list as a>
        <@t.merge 'moduleIds' a.id!/>
    </#list>
    <@sys.roleModule roleIds=admin.roles moduleIds=t.moduleIds!><#assign roleModuleMap=map!/></@sys.roleModule>
    
    <#list page.list as a>
        <#if (roleModuleMap[a.id?string])?has_content&&roleModuleMap[a.id?string]>
    <div class="accordionHeader">
        <h2><#if (a.attached)?has_content><i class="${a.attached} icon-large"></i></#if> <@t.menu a.id/> <i class="icon icon-chevron-up"></i></h2>
    </div>
    <div class="accordionContent">
        <ul class="tree">
        <@sys.moduleList parentId=a.id>
            <#list page.list as a>
                <@t.merge 'childModuleIds' a.id!/>
            </#list>
            <@sys.roleModule roleIds=admin.roles moduleIds=t.childModuleIds!><#assign childRoleModuleMap=map!/></@sys.roleModule>
            <#list page.list as a>
                <#if (childRoleModuleMap[a.id?string])?has_content&&childRoleModuleMap[a.id?string]>
            <li><a href="${(a.url)!}" target="navTab" rel="${(a.url)!}"><#if (a.attached)?has_content><i class="${a.attached} icon-large"></i></#if> <@t.menu a.id/></a></li>
                </#if>
            </#list>
        </@sys.moduleList>
        </ul>
    </div>
        </#if>
    </#list>
</@sys.moduleList>
</div>